from collections import namedtuple

# 使用 rename 来防止非法字段
with_class = namedtuple('Person', 'name class age',
                        rename=True)
print(with_class._fields)

two_age = namedtuple('Person', 'name age age',
                     rename=True)
print(two_age._fields)
